#!/usr/bin/python
# _*_ coding: utf8 _*_
#Created: 2010. 7. 5.
'''
사용법:


'''

##GLOBALS
g_WeatherXmlUrlSeoul = 'http://weather.yahooapis.com/forecastrss?w=1132599&u=c'
g_WeatherHttpUrlSeoul = 'http://weather.naver.com/rgn/cityWetrCity.nhn?cityRgnCd=CT001013'
#http://www.naver.com/include/timesquare/widget/weather/domestic/weather.CT001013.xml?random=1278415099625

##IMPORTS
import urllib2
from BeautifulSoup import BeautifulSoup
import MoPostTwitter

class CGetWeather():
    #Member
    m_stStatusMor = ''
    m_stStatusEve = ''
    m_TempHigh = ''
    m_TempLow = ''
    
    #__init__
    def __init__(self):
        pass
        self.GetWeatherData()
    
    def GetWeatherData(self):
        global g_WeatherXmlUrl
        
        try:
            stContents = urllib2.urlopen(g_WeatherXmlUrlSeoul).read()
        except:
            stContents = False
        
        if not stContents == False:
            soup = BeautifulSoup(stContents)
            soupResult = soup.findAll('description')
            print soupResult
        else:
            pass
        
        
        
    def SendLottoToTwitter(self):
        pass
        



def main():
    pass
    run = CGetWeather()
    

if __name__ == "__main__":
    main()
